#include "ForecastClient.h"
#include "WeatherData.h"

ForecastClient::ForecastClient(DisplayBehavior *displayBehavior){
    this->displayBehavior = displayBehavior;
}

void ForecastClient::update(Subject *subject){
    WeatherData *wd = dynamic_cast<WeatherData *>(subject);
    display(wd->getTemperature(), wd->getHumidity(), wd->getPressure());
}

void ForecastClient::display(float t, float h, float p){
    displayBehavior->display(t, h, p);
}